//
//  HYHomeFileItemViewModel.h
//  XPlayer
//
//  Created by liguoqing on 2023/9/4.
//

#import <BaseWithRAC/BaseViewModel.h>
@class HYHomeFolderModel;
@class HYHomeVideoModel;
@class HYPreviewHistoryModel;
@class HYMyCollectionModel;

typedef NS_ENUM(NSInteger,HYHomeFileType) {
    HYHomeFileType_Document,    // 我的文档：PC/WI-FI传输文件
    HYHomeFileType_Photo,       // 相册
    HYHomeFileType_Download,    // 下载
    HYHomeFileType_Cloud,       // 云盘
    HYHomeFileType_Collect,     // 收藏
    HYHomeFileType_Folder,      // 文件夹
    HYHomeFileType_Lock,        // 加锁文件夹
    HYHomeFileType_Audio,       // 音频
    HYHomeFileType_Video,       // 视频
    HYHomeFileType_Pic,         // 图片
    HYHomeFileType_File,        // 文件
    HYHomeFileType_Zip,         // 压缩文件
    HYHomeFileType_Other,       // 其他文件
    HYHomeFileType_All          // 所有类型
};

NS_ASSUME_NONNULL_BEGIN

@interface HYHomeFileItemViewModel : BaseViewModel

/// folderModel转fileModel
- (instancetype)initWitFolderModel:(HYHomeFolderModel *)folderModel;
/// videoModel转fileModel
- (instancetype)initWitVideoModel:(HYHomeVideoModel *)videoModel;
/// historyModel转fileModel
- (instancetype)initWitHistroyModel:(HYPreviewHistoryModel *)historyModel;
/// collectionl转fileModel
- (instancetype)initWitCollectModel:(HYMyCollectionModel *)collectModel;
// 文件夹
@property (nonatomic, strong) HYHomeFolderModel *folderModel;
// 视频
@property (nonatomic, strong) HYHomeVideoModel *videoModel;
// 设置
@property (nonatomic, strong) RACSubject *setSubject;
// 文件类型
@property (nonatomic, assign) HYHomeFileType fileType;
// 父类文件夹标识
@property (nonatomic, strong) NSString *folderLocation;
// 当前文件夹标识
@property (nonatomic, strong) NSString *folderIdentification;
// 文件名称
@property (nonatomic, strong) NSString *fileName;
// 视频文件后缀名
@property (nonatomic, strong) NSString *fileSuffixName;
// 文件路径
@property (nonatomic, strong) NSString *filePath;
// 所在文件夹路径
@property (nonatomic, strong) NSString *folderPath;
// 文件封面
@property (nonatomic, strong) NSString *fileImage;
// 文件个数
@property (nonatomic, assign) NSInteger fileCount;
// 文件大小
@property (nonatomic, assign) NSInteger fileSize;
// 视频封面
@property (nonatomic, strong) UIImage *videoImage;
// 视频时长
@property (nonatomic, strong) NSString *videoDuration;
// 播放记录
@property (nonatomic, assign) NSInteger playTime;
// 上次观看时间
@property (nonatomic, strong) NSString *lastTime;
// 文件创建日期
@property (nonatomic, strong) NSString *createDate;
// 文件导入日期
@property (nonatomic, strong) NSString *importDate;
// 是否加锁
@property (nonatomic, assign) BOOL isLock;
// 是否被选中
@property (nonatomic, assign) BOOL isSelect;
// 父类文件夹是否私密
@property (nonatomic, assign) BOOL isSuperPrivate;
/// 是否隐藏设置按钮
@property (nonatomic, assign) BOOL isHiddenSet;
/// 是否是历史记录
@property (nonatomic, assign) BOOL isHistory;

// 更新文件名(首页)
- (BOOL)modifyFileNameToDB;
// 更新文件名(沙盒)
- (BOOL)modifyFileNameToSandbox;
// 移除文件
- (BOOL)deleteFileToDB;
// 移除文件（沙盒下）
- (BOOL)removeDocumentFile;
// 移动文件夹
- (BOOL)moveFileLocationToDB;
// 移动文件或文件夹（沙盒下）
- (BOOL)moveDocumentFileToFolderPath:(NSString *)folderPath;
// 文件夹加锁或解锁
- (BOOL)lockOrUnLockFolderToDB;

@end

NS_ASSUME_NONNULL_END
